import React from 'react'
import { Link, NavLink } from 'react-router-dom'

const Index = () => {
  // throw new Error('aaa')
  return (
    <div>
      <h3>首页列表</h3>
      <hr />
      <ul>
        <li>
          <Link to="/detail/1?name=aaaa" state={{ age: 100 }}>
            新闻1
          </Link>
        </li>
        <li>
          <Link to="/detail/2?name=bbb" state={{ age: 200 }}>
            新闻2
          </Link>
        </li>
      </ul>
    </div>
  )
}

export default Index
